// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved.
package fl.controls;
	
import fl.controls.TextInput;
import fl.controls.TextArea;
import fl.core.InvalidationType;
import fl.core.UIComponent;
import fl.events.ComponentEvent;
import fl.managers.IFocusManager;
import fl.managers.IFocusManagerComponent;
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.TextEvent;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.system.IME;
import flash.text.TextField;
import flash.text.TextFieldType;
import flash.text.TextFormat;
import flash.text.TextLineMetrics;
import flash.ui.Keyboard;


extern class TextInput extends UIComponent, implements IFocusManagerComponent {
	public var textField:TextField;
	var _editable:Bool = true;
	var background:DisplayObject;
	var _html:Bool = false;
	var _savedHTML:String;
	public static function getStyleDefinition():Dynamic;
	public static var createAccessibilityImplementation:Dynamic->Dynamic;
	public function new():Void;
	public var text(dynamic, dynamic):String;
	public var enabled(dynamic, dynamic):Bool;
	public var imeMode(dynamic, dynamic):String;
	public var alwaysShowSelection(dynamic, dynamic):Bool;
	public function drawFocus(draw:Bool):Void;
	public var editable(dynamic, dynamic):Bool;
	public var horizontalScrollPosition(dynamic, dynamic):Int;
	public var maxHorizontalScrollPosition(dynamic, null):Int;
	public var length(dynamic, null):Int;
	public var maxChars(dynamic, dynamic):Int;
	public var displayAsPassword(dynamic, dynamic):Bool;
	public var restrict(dynamic, dynamic):String;
	public var selectionBeginIndex(dynamic, null):Int;
	public var selectionEndIndex(dynamic, null):Int;
	public var condenseWhite(dynamic, dynamic):Bool;
	public var htmlText(dynamic, dynamic):String;
	public var textHeight(dynamic, null):Float;
	public var textWidth(dynamic, null):Float;
	public function setSelection(beginIndex:Int, endIndex:Int):Void;
	public function getLineMetrics(index:Int):TextLineMetrics;
	public function appendText(text:String):Void;
	function updateTextFieldType():Void;
	function handleKeyDown(event:KeyboardEvent):Void;
	function handleChange(event:Event):Void;
	function handleTextInput(event:TextEvent):Void;
	function setEmbedFont():Void;
	function draw():Void;
	function drawBackground():Void;
	function drawTextFormat():Void;
	function drawLayout():Void;
	function configUI():Void; 
	public function setFocus():Void; 
	function isOurFocus(target:DisplayObject):Bool;
	function focusInHandler(event:FocusEvent):Void;
	function focusOutHandler(event:FocusEvent):Void;
}
